home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / khpxtab.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  2KB  |  50 lines

  1. #ifndef __KH_PX_TABLE_H_
  2. #define __KH_PX_TABLE_H_
  3.  
  4. #include "abstable.h"
  5. #include "pxtable.h"
  6.  
  7. class KH_PX_Table : public KH_AbstractTable, public KH_PXTable
  8.     {
  9.     public:
  10.     KH_PX_Table(rect coordinates,             // Screen cells
  11.            char* tabName,                     // Table name
  12.            char* fName = "",                  // File for swapping
  13.            char* h = "",                      // Header text
  14.            int s = 0,                         // Shadow, pixels
  15.            BORDERS b_type = SHOW_BORDER,      // Border type
  16.            BORDERS hdr_b_type = SHOW_BORDER,  // Border around header
  17.            int res = 0,                       // Resize status
  18.            int hdr_pat = 0,                  // Attention! No window pattern.
  19.  
  20. // Use last 3 arguments for creating new table.
  21.            int fNo = 0,               // Number of fields in table
  22.            char** fields = NULL,      // Fields names array
  23.            char** types = NULL);       // Fields types array
  24.  
  25.        ~KH_PX_Table() { delete iColWidth; delete colNumbers; }
  26.        int check_type(int type, char* string);
  27.        virtual long RecordNumber();
  28.            long getYPos() { return yStart + yPos + 1; }
  29.        virtual int getColumnNumber();
  30.        virtual void getFieldName(char* name, int n);
  31.        virtual void showField(int sx, int x, int y, int flag,
  32.            int field_type);
  33.        virtual void saveTable();
  34.        virtual int writeAccess() { return 1; }  // No write protect !!!
  35.        virtual void editField();
  36.        virtual int getFieldMaxWidth();
  37.        virtual void insRecord();
  38.        virtual void delRecord();
  39.        virtual int searchField(int ask);
  40. /* After processing of touch() function global_num is set to the
  41.      number of fields in table (fieldNames->used), global[1 - global_num]
  42.      is set to translated fields values, global[global_num + 1] is set to
  43.      tableName, and global[0] is set to "Ask" string.
  44.      global_i[1 - global_num] is set to FIELD_TYPES.
  45. */
  46.               virtual void touch(int i = 0);
  47.     };
  48.  
  49.  
  50. #endif __KH_PX_TABLE_H_